/*
 * Copyright (C) 2016. For Intelligent Group.
 */

package com.intelligent.ispc.client.core.validator;

import com.intelligent.ispc.client.utils.binding.AbstractBean;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * Created by Tony.yu on 2016/11/9.
 */
public class GroupsDto extends AbstractBean {

    public static final String PROPERTYNAME_GROUPS = "groups";

    @NotEmpty(message = "Don't be empty")
    @Min(value = 1, message = "Min must be 1")
    @Max(value = 2147483647, message = "Max must be 2147483647")
    @Digits(integer = 10, fraction = 0, message = "Not be Integer")
    private String groups;

    public String getGroups() {
        return groups;
    }

    /**
     * Set Groups' value
     *
     * @param groups groups
     */
    public void setGroups(String groups) {

        firePropertyChange(PROPERTYNAME_GROUPS, this.groups, this.groups = groups);
    }

}
